package PowerWord.UI.StudyMode;

import java.io.File;

import PowerWord.Core.Data.Defines;
import android.content.Context;
import android.preference.ListPreference;
import android.util.AttributeSet;

public class WordListSettingBar extends ListPreference {

	public WordListSettingBar(Context context, AttributeSet attrs) {
		super(context, attrs);
		File dir = new File(Defines.ListDirectory);
		if(dir.isDirectory()) {
			setEntries(dir.list());
			setEntryValues(dir.list());
		}
		setSummary(getValue());
	}
	
	@Override
	protected void onDialogClosed(boolean positiveResult){
		super.onDialogClosed(positiveResult);
		setSummary(getValue());
	}
}
